x2APIC/VT-d: allocate iommu when create a drhd
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jul 2010 07:29:10 +0000 (08:29 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jul 2010 07:29:10 +0000 (08:29 +0100)
commit600814950bcbc535c39e8fe9501677e2a926f78b
tree6d0f72ad38665d738858badd6b2a079cdbf5bdd1
parent34b9ec52897ea6fdbedc695ed7d42242d75f4e27
x2APIC/VT-d: allocate iommu when create a drhd

A drhd is created when parse ACPI DMAR table, but drhd->iommu is not
allocated until iommu setup. But iommu is needed by x2APIC which will
enable interrupt remapping before iommu setup. This patch allocates
iommu when create drhd. And then drhd->ecap can be removed because
it's the same as iommu->ecap.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/vtd/dmar.c
xen/drivers/passthrough/vtd/dmar.h
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/vtd.h